/**
 * Created by Administrator on 2017/10/17.
 */
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test', { useMongoClient: true });
mongoose.Promise = global.Promise;

var Cat = mongoose.model('Cat', { name: String });

var kitty = new Cat({ name: 'Zildjian' });
kitty.save(function (err) {
	if (err) {
		console.log(err);
	} else {
		console.log('meow');
	}
});